#ifndef _DATA_H_
#define _DATA_H_

#include "common/common.h"
#include "json/json-usr.h"
#include "route/route.h"
#include "trans/trans.h"


namespace iecas_ns
{
    class CData
    {
        #define MESG_DEV_HEAD "CGQZS"
        #define MAXDATASIZE 128

		public:
			static shared_ptr<CData> getInstance();
            CData();
			bool init(void);
            void start(void);
		private:
			static shared_ptr<CData> sm_intancePtr;
            shared_ptr<CCommon> m_commonPtr;
            shared_ptr<CJsonUsr> m_jsonUsrPtr;
            shared_ptr<CRoute> m_routePtr;
            shared_ptr<CTrans> m_transPtr;
            void loop(void);
            void data_trans(string src_data);
            void mesg_dev_trans(string data_head, string data_body);
            void order_dev_trans(string data_head);
            void order_chg_dev_trans(string data_head);
            void order_out_dev_trans(string data_head);
    };
}

#endif